#{extends 'main.html' /} #{set title:'Home' /}
<html>
<body>

	<!-- This html page is for browsing the published tutorials. It displays under the topics its
         related tutorials.
         @author Dina
      -->

	#{ifnot tutorials}
	<p>
		<br> There are no tutorials published yet.
	</p>
	#{/ifnot}

	<form action="@{Tutorials.browseTypes()}" method="get">
		<ol>
			#{list items:topics , as:'Topic'}
			<br>
			<br> #{if flag == true}
			<li><a href="/Topics/topicView?topicId=${Topic.id}">${Topic.topicName}</a>
			</li> &nbsp; #{/if} #{if flag == false}
			<li><b>${Topic.topicName}</b></li> &nbsp; #{/if}
			<ol>
				#{list items:tutorials , as:'Tutorial'} #{if (Topic.id
				==Tutorial.topicT.id)}
				<li><a href="/Tutorials/tutorialPage?tutId=${Tutorial.id}">${Tutorial.Title}</a>
				</li> #{/if} #{/list}
			</ol>
			#{/list}
		</ol>
	</form>

</body>
</html>


